package com.xhwy.enums;

//自定义枚举类：订单状态
public class OrderState1 {
    //1.声明OrderState1对象的属性：private final修饰
    private final Integer stateCode;//状态码
    private final String stateDesc;//状态描述

    //2.私有化构造器
    private OrderState1(Integer stateCode, String stateDesc){
        this.stateCode = stateCode;
        this.stateDesc = stateDesc;
    }

    //3.提供当前枚举类的多个对象
    public static final OrderState1 OBLIGATION = new OrderState1(0, "待付款");
    public static final OrderState1 WAITDELIVER = new OrderState1(1, "待发货");
    public static final OrderState1 WAITRECEIVE = new OrderState1(2, "待收货");
    public static final OrderState1 WAITCOMMENT = new OrderState1(3, "待评价");

    @Override
    public String toString() {
        return "OrderState1{" +
                "stateCode=" + stateCode +
                ", stateDesc='" + stateDesc + '\'' +
                '}';
    }
}
